package com.zuihai.app.di.module;

import com.jess.arms.di.scope.FragmentScope;
import com.zuihai.app.mvp.contract.HomeRecyclerContract;
import com.zuihai.app.mvp.model.HomeRecyclerModel;

import dagger.Module;
import dagger.Provides;

/**
 * Created by Administrator on 2017/5/4 0004.
 */

@Module
public class HomeRecyclerModule {
    private HomeRecyclerContract.View view;

    /**
     * 构建HomeRecyclerModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public HomeRecyclerModule(HomeRecyclerContract.View view) {
        this.view = view;
    }

    @FragmentScope
    @Provides
    HomeRecyclerContract.View provideHomeRecyclerView() {
        return this.view;
    }

    @FragmentScope
    @Provides
    HomeRecyclerContract.Model provideHomeRecyclerModel(HomeRecyclerModel model) {
        return model;
    }
}